package com.wwmz.pattern.prototype.general;

import java.util.ArrayList;

/**
 * Created by wumz on 2020/9/17 16:44
 */
public class Test {

    public static void main(String[] args) {
        //创建原型对象
        ConcreatePrototype concreatePrototype = new ConcreatePrototype();
        concreatePrototype.setSex(4);
        concreatePrototype.setName("wumz");
        System.out.println(concreatePrototype);

        //拷贝
        ConcreatePrototype clone = concreatePrototype.clone();
        System.out.println(clone);
        System.out.println(clone == concreatePrototype);
    }
}
